package com.kabigon.tiny;

import com.kabigon.tiny.module.DemoModule;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author xu.biao
 * @version v1.0
 * @Package com.kabigon.tiny
 * @data 2022/12/17 22:09
 */
@Configuration
@EnableConfigurationProperties(DemoProperties.class)
public class DemoAutoConfiguration {

    @Bean
    public DemoModule demoModule(DemoProperties demoProperties) {
        DemoModule demoModule = new DemoModule();
        demoModule.setVersion(demoProperties.getVersion());
        demoModule.setName(demoProperties.getName());

        return demoModule;
    }

}
